﻿
    <vt:foreach id="ques" from="$#.ques" item="q" index="i" remark="试题">
      <vt:function var="IsCollect" method="IsCollect" args="$#.q.qus_id"/>
      <div class="quesItem" qid="{$:#.q.qus_id}" index="{$:i}" IsCollect="{$:#.IsCollect}" type="{$:#.q.qus_type}">
        <div class="quesBox"> 
          <!--试题的题干 -->
          <div class="quesTitle"><span class="index">{$:i}</span>.<span class="ques-type"></span> {$:#.q.qus_title} </div>
          <!--试题答案选项 -->
          <div class="quesItemsBox t{$q.qus_type}">
            <vt:if var="q.qus_type" value="1" compare="="> 
              <!--单选题 -->
              <vt:function var="items" method="AnswerItems" args="$#.q"/>
              <vt:foreach from="$#.items" item="ans" index="j">
                <div correct="{$:ans.Ans_IsCorrect}" ansid="{$:ans.Ans_id}"><b></b>{$:ans.Ans_Context} </div>
              </vt:foreach>
            </vt:if>
            <vt:if var="q.qus_type" value="2" compare="="> 
              <!--多选题 -->
              <vt:function var="items" method="AnswerItems" args="$#.q"/>
              <vt:foreach from="$#.items" item="ans" index="j">
                <div class="answer"  correct="{$:ans.Ans_IsCorrect}" ansid="{$:ans.Ans_id}"><b></b>{$:ans.Ans_Context} </div>
              </vt:foreach>
            </vt:if>
            <vt:if var="q.qus_type" value="3" compare="="> 
              
              <!--判断题 -->
              <vt:function var="answer" method="GetAnswer" args="$#.q"/>
              <vt:if var="answer" value="正确" compare="=">
                <div class="answer" correct="true" ansid="0"><b></b>正确</div>
                <div class="answer" correct="false" ansid="1"><b></b>错误</div>
                <vt:else/>
                <div class="answer" correct="false" ansid="0"><b></b>正确</div>
                <div class="answer" correct="true" ansid="1"><b></b>错误</div>
              </vt:if>
            </vt:if>
            <vt:if var="q.qus_type" value="4" compare="=">
              <div class="answer">
                <i> </i>回答：
                <textarea name="" class="textbox4"></textarea>
              </div>
            </vt:if>
            <vt:if var="q.qus_type" value="5" compare="="> 
              <!--填空题 -->
              <vt:function var="items" method="AnswerItems" args="$#.q"/>
              <vt:foreach from="$#.items" item="ans" index="j">
                <div class="answer" correct="{$:ans.Ans_Context}" ><b></b>
                  <input name=""  class="textbox5" type="text"/>
                </div>
              </vt:foreach>
            </vt:if>
          </div>
          <!--提交按钮-->
          
          <div class="btnSubmit" font="no"> <span class="iconfont">&#xe605;</span>提交答题信息</div>
        </div>
        
        <!--试题答案-->
        <div class="quesAnswerBox">
          <div class="quesAnswerTitle">正确答案：
            <div class="answerBtnbar"> <span class="btnError">报错</span> <span class="btnFav" >收藏</span> <span class="btnNote">笔记</span> </div>
          </div>
          <div class="quesAnswerContent">
            <vt:function var="answer" method="GetAnswer" args="$#.q"/>
            {$answer}</div>
          <vt:if var="q.Qus_Explain" value="" compare="!=">
            <div class="quesAnswerTitle">试题解析：</div>
            <div class="quesAnswerContent">{$:#.q.Qus_Explain} </div>
          </vt:if>
        </div>
      </div>
     <vt:foreachelse/>
     <div id="noQues">
      <vt:if var="canStudy" value="false" compare="=" remark="如果不能学习"> 
      该章节试题禁止练习
       <vt:else/>
       没有试题！
      </vt:if>
     
     </div>
    </vt:foreach>
 